<%= form_for @bookmark, :url => (@bookmark.new_record? ? bookmarks_path : bookmark_path(:id => @bookmark)) do |f| %>
  <%= base_errors_for @bookmark %>
  <%= text_f f, :name %>
  <%= textarea_f f, :query, :size => "col-md-8" , :rows=> '3' %>
  <%= @bookmark.new_record? ? checkbox_f(f, :public, :checked => true) : checkbox_f(f, :public, :checked => @bookmark.public?) %>
  <%= f.hidden_field :controller %>
  <%= submit_or_cancel f %>
<% end %>
